package com.cloudlead.common.worker.desc.security;

import java.lang.annotation.Annotation;

import com.cloudlead.common.worker.security.annotation.Logical;
import com.cloudlead.common.worker.security.annotation.RequirePrivileges;

@SuppressWarnings("all")
public class RequirePrivilegesDesc implements RequirePrivileges {

	private final String[] values;

	private final Logical logical;

	public RequirePrivilegesDesc(String[] values) {
		super();
		this.values = values;
		this.logical = Logical.AND;
	}

	public RequirePrivilegesDesc(String[] values, Logical logical) {
		super();
		this.values = values;
		this.logical = logical;
	}

	@Override
	public Class<? extends Annotation> annotationType() {
		return RequirePrivileges.class;
	}

	@Override
	public String[] value() {
		return values;
	}

	@Override
	public Logical logical() {
		return logical;
	}

}
